using System.Windows;
using DryIoc;
using KinonekoSoftware.Foundation.Platform;
using KinonekoSoftware.Foundation.Platform.Graphics;
using KinonekoSoftware.Platform.Core;
using KinonekoSoftware.Platform.Views;

namespace KinonekoSoftware.Platform.Windows
{
    public abstract partial class WindowsApplication
    {

        internal override void InstallServicesInternal()
        {
            base.InstallServicesInternal();

            Ioc.Use<IPlatformImageProcessor, ImageProcessorImpl>(new ImageProcessorImpl());
        }

        protected internal virtual object FrameworkInitializationCompleted()
        {
            //
            //
            var context = SynchronizationContext.Current!;
            var shell   = SetupShell();
            
            //
            //
            OnFrameworkInitializationCompletedOverride();

            
            
            Xplat.SetupUIThread(context);

            //
            //
            shell.Start();

            return shell;
        }
    }
}